# Which compiler
# CC = gcc
# AR = ar
# AT = @

# source file
# SRCS := ${wildcard *.c}
SRCS := rf433.c
SRCS += rf433_master.c

OBJS = $(patsubst %.c,$(OBJS_PATH)%.o,$(SRCS))

# Where are include files kept
INCLUDES = -I./
INCLUDES = -I$(PROJ_ROOT_PATH)/component/cc1101

# Option for development
CFLAGS = -g -Wall
# CXXFLAGS = 
# Option for release
# CFLAGS = -O -Wall

TARGET = librf433.a


include config.mk


all: $(OBJS)
	$(AT)$(AR) rcs $(TARGET) $^
	$(AT)mv $(TARGET) $(LIBS_PATH)

$(OBJS):$(OBJS_PATH)%.o:%.c
	$(AT)$(CC) $(CFLAGS) $(INCLUDES) -c $^ -o $@


.PHONY: clean
clean:
	$(AT)-rm -f *.o
